package com.example.service.impl;

import com.example.context.BaseContext;
import com.example.entity.Student;
import com.example.mapper.StudentMapper;
import com.example.service.IStudentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 陈昌吉
 * @since 2024-05-06
 */
@Service
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements IStudentService {

    @Autowired
    private StudentMapper studentMapper;

    /**
     * 获取所有Student
     * @return
     */
    @Override
    public List<Student> getAll() {
        List<Student> students=studentMapper.selectStudent();
        System.out.println(students);
        return students;
    }

}
